<template>
  <Title>cms-首页</Title>
  <Meta name="description" content="cms" >
  </Meta>
  <div>
      hello world
    <div v-for="item in items" :key="item.id">{{ item.bidName }}</div>
  </div>
</template>
<script setup  lang="js">
import { get } from '~/utils/request'; // 导入封装的 Axios 请求工具
// 使用全局注入的 get 和 post 方法
const {  $get } = useNuxtApp();
const items=ref([])

onMounted(async () => {
  console.info("init request")
  let tenant= useNuxtApp().ssrContext.event.context.tenant;
  console.info(tenant)
 let res=await $get("/boxFront/bidInformation/searchBid?page=1&rows=4",{});
  console.info(res)
  if (res.code===200){
    items.value=res.data;
  }

  let res2=await get("/boxFront/bidInformation/searchBid?page=1&rows=4");
  console.info(res)
  if (res2.code===200){
    items.value=res2.data;
  }

});
</script>
<style scoped>

</style>
